jQuery.usernumbers = function()
{
	var posts = _j('.post'),
		len = posts.length;
	
	function init()
	{
		for (var i = len; i--;)
		{
			add_number_post(_j(posts[i]));
		}
	}
	
	function add_number_post(post)
	{
		var link = post.find('.dd .p a[href*="/users/"]'),
			uid = post.attr('class').match('u([0-9]+)');
				
		if (uid) link.after(' <span>['+uid[1]+']</span>');
	}
	
	function add_number_profile()
	{
		var uname_holder = _j('.userblock .username a'),
			uname = uname_holder.text();
			uid = document.getElementsByClassName("vote")[0].getAttribute('uid');
			
		if (uid) uname_holder.text(uname+' | '+uid);
	}
	
	document.addEventListener("DOMNodeInserted", function(e){
		var obj = _j(e.target); if (obj.hasClass('post')) add_number_post(_j(obj));
	}, false);
	
	if (len) init();
	if (location.pathname.match('/users/')) add_number_profile();
}

jQuery(document).ready(function(){
	jQuery.usernumbers();
});